home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 50
/
Volume 50 - JOGO DISK .iso
/
Games
/
moonstonemadness.swf
/
scripts
/
__Packages
/
Library
/
DispatcherBase.as
< prev
next >
Wrap
Text File
|
2007-09-27
|
1KB
|
52 lines
class Library.DispatcherBase
{
function DispatcherBase()
{
this.bPaused = false;
this.aListeners = new Array();
}
function doEnterFrame()
{
if(!this.bPaused)
{
this.doDispatchMessage("doEnterFrame");
}
}
function doAddListener(__oRef)
{
this.aListeners.push(__oRef);
}
function doRemoveListener(__oRef)
{
for(var _loc2_ in this.aListeners)
{
if(this.aListeners[_loc2_] == __oRef)
{
delete this.aListeners[_loc2_];
this.aListeners.splice(Number(_loc2_),1);
}
}
}
function doPause()
{
this.bPaused = true;
this.doDispatchMessage("doPause");
}
function doResume()
{
this.bPaused = false;
this.doDispatchMessage("doResume");
}
function doDestroy()
{
delete this.aListeners;
}
function doDispatchMessage(__sMessage)
{
for(var _loc3_ in this.aListeners)
{
this.aListeners[_loc3_].__sMessage();
}
}
}